package com.course.finalproject;

import android.widget.Toast;

public class Utility {

	/**
	 * Shows a toast notification.
	 * 
	 * @param message The message that wants to show.
	 */
	public static void toast(String message) {
		makeToast(message, Toast.LENGTH_SHORT);
	}
	
	/**
	 * Shows a toast notification for a long period of time.
	 * 
	 * @param message The message that wants to show.
	 */
	public static void longToast(String message) {
		makeToast(message, Toast.LENGTH_LONG);
	}
	
	/**
	 * Effectively makes a toast notification.
	 * 
	 * @param message The message that wants to show.
	 * @param lenght The length of time that the notification is shown.
	 */
	private static void makeToast(String message, int lenght) {
		Toast.makeText(MyApplication.getInstance().getApplicationContext(), message, lenght).show();
	}
	
}
